﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Text;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Project_Origin
{
    public partial class PO_If_Next_Stage : Form
    {
        //状况存储
        public int Change { get; set; }
        //返回状态
        public int Status { get; set; }
        public PO_If_Next_Stage()
        {
            InitializeComponent();
        }
        //累计 游戏状态
        public PO_If_Next_Stage(int Int,int change)
        {
            InitializeComponent();
            this.Change = change;
            switch (change)
            {
                case 1:
                    PO_Next_Label.Text = "时间到";
                    break;
                case 2:
                    PO_Next_Label.Text = "过关";
                    break;
                case 3:
                    PO_Next_Label.Text = "猜对啦";
                    break;
            }
            //显示累计
            if (this.Change == 3)
            {
                //累计关卡
                string GK = Int.ToString() + "次";
                PO_Next_Int.Text = GK;
            }
            else
                PO_Next_Int.Text = Int.ToString();
        }

        private void PO_Back_Button_Click(object sender, EventArgs e)
        {
            PO_ModeSelect_Menu pO_ModeSelect_Menu = new PO_ModeSelect_Menu();
            pO_ModeSelect_Menu.Show();
            this.Dispose();
            this.Close();
            this.Status = 1;
        }

        private void PO_Continue_Button_Click(object sender, EventArgs e)
        {
                this.Dispose();
                this.Close();
 
        }

        private void PO_If_Next_Stage_FormClosed(object sender, FormClosedEventArgs e)
        {
            this.Close();
        }

        private void PO_If_Next_Stage_Load(object sender, EventArgs e)
        {
            string AppPath = Application.StartupPath;
            PrivateFontCollection privateFonts = new PrivateFontCollection();
            try
            {
                privateFonts.AddFontFile(AppPath + @"\Resources\站酷快乐体.ttf");//加载字体
                Font font = new Font(privateFonts.Families[0], 20);
                PO_Next_Int.Font = font;
                PO_Next_Label.Font = font;
            }
            catch
            {
                MessageBox.Show("字体不存在或加载失败\n程序将以默认字体显示", "警告", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
    }
}
